import { Body, Controller, Get, Post } from '@nestjs/common';
import { AppService } from './app.service';

@Controller()
export class AppController {
  constructor(private readonly appService: AppService) {}

  @Get()
  getHello(): string {
    return this.appService.getHello();
  }

  @Get('/user')
  getHome(): any {
    return this.appService.getUser();
  }

  @Post()
  async createAccount(
    @Body() data: any,
  ):Promise<any> {
    return await this.appService.createAccount(data);
  }
}
